package events;
import java.util.ArrayList;

public class EventDispatcher implements IEventDispatcher {

	private ArrayList<IEventListener> list = new ArrayList<IEventListener>();
	
	public void addEventListener( IEventListener object ){
		list.add( object );
	}
	
	public void removeEventListener( IEventListener object ){
		list.remove(object);
	}
	
	public void dispatchEvent( Event event){
		for( IEventListener el:list )
			el.executeEvent( event );
	}
	
}
